/*
 * @FilePath: \Src\BSP\inc\drv_usart.h
 * @Description: 
 * 
 * Copyright (c) 2025 by ${w}, All Rights Reserved. 
 */

#ifndef DRV_USART__H_
#define DRV_USART__H_

#define RX_LENTH_MAX 64

typedef struct
{
    uint8_t Flag_Rec;
    uint8_t Length_Rec;
    uint8_t RxBuffer[RX_LENTH_MAX];
}Usart1_t;

extern Usart1_t sUsart1;

void uasrt1_init(uint32_t baud);
void Usart1_SendData(uint8_t *data);
void Usart1_SendPackage(uint8_t *data, uint16_t length);

void uasrt0_init(uint32_t baud);
void Usart0_SendData(uint8_t *data);
void Usart0_SendPackage(uint8_t *data, uint16_t length);

typedef struct
{
    uint8_t Flag_Rec;
    uint8_t Length_Rec;
    uint8_t RxBuffer[RX_LENTH_MAX];
}Usart0_t;

extern Usart0_t sUsart0;

#endif // !DRV_USART__H_

